<div class="topic">
  <header class="topic-header">
    <div class="topic-header-wrap">
      <div class="topic-header-avatar">
        <%= SharedHelpers.lazy_image(icon_url(@topic), "#{@topic.name} Icon", width: 80, height: 80) %>
      </div>

      <h2 class="topic-header-title"><%= @topic.name %></h2>

      <div class="topic-header-description">
        <%= @topic.description %>
        <%= admin_edit_link(@conn, @current_user, @topic) %>
      </div>

      <div class="topic-header-meta">
        <%= SharedHelpers.pluralize(@page.total_entries, "episode", "episodes") %>
      </div>
    </div>

    <%= link "All Topics", to: ~p"/topics", title: "View All Topics", class: "topic-header-back" %>
  </header>

  <a id="feed" class="anchor"></a>
  <div class="feed">
  <%= if Enum.any?(@page.entries) do %>
    <%= render_many(@page, EpisodeView, "_item.html") %>
    <%= render(SharedView, "_more_button.html", assigns) %>
  <% else %>
    <p class="feed-note">Nothing to see here. <%= link("Submit", to: ~p"/news/submit") %> some news or <%= link("request", to: ~p"/request/new") %> an episode.</p>
  <% end %>
  </div>
</div>
